import change from "../../mock/mockGUO";
const leaveGuo = {
  namespaced: true,
  state: {
    // lylist留言内容
    lylist: [],
    // count总条数
    count: 0,
  },
  mutations: {
    // 获取留言数据
    getly(state, payload) {
      state.lylist = [...payload.list];
      state.count = payload.count;
    },
  },
  actions: {
    // 获取留言
    async getlyAsync({ commit }, page) {
      // 获取当前页码的数据
      const res = await change.getDate(page);
      commit("getly", res);
    },
  },
  modules: {},
};

export default leaveGuo;
